home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / prolog / sbprolog / v3 / sim.lha / sim / simdef.h < prev    next >
C/C++ Source or Header  |  1990-04-12  |  3KB  |  76 lines

  1. /************************************************************************
  2. *                                    *
  3. * The SB-Prolog System                            *
  4. * Copyright SUNY at Stony Brook, 1986; University of Arizona, 1987    *
  5. *                                    *
  6. ************************************************************************/
  7.  
  8. /*-----------------------------------------------------------------
  9. SB-Prolog is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY.  No author or distributor
  11. accepts responsibility to anyone for the consequences of using it
  12. or for whether it serves any particular purpose or works at all,
  13. unless he says so in writing.  Refer to the SB-Prolog General Public
  14. License for full details.
  15.  
  16. Everyone is granted permission to copy, modify and redistribute
  17. SB-Prolog, but only under the conditions described in the
  18. SB-Prolog General Public License.   A copy of this license is
  19. supposed to have been given to you along with SB-Prolog so you
  20. can know your rights and responsibilities.  It should be in a
  21. file named COPYING.  Among other things, the copyright notice
  22. and this notice must be preserved on all copies. 
  23. ------------------------------------------------------------------ */
  24. /* simdef.h */
  25.  
  26. #include "sim.h"
  27. #include <stdio.h>
  28.  
  29. LONG_PTR  memory;          /* heap, local stack */
  30. LONG_PTR  pspace;          /* psc records, instructions, p-names */
  31. LONG_PTR  tstack;          /* trail stack */
  32. LONG      reg[MAXREGS];    /* general purpose registers */
  33.  
  34. LONG_PTR  local_bottom;
  35. LONG_PTR  heap_bottom;
  36. LONG_PTR  trail_bottom;
  37.  
  38. CHAR_PTR  curr_fence;      /* ptr to next free byte in perm space */
  39. CHAR_PTR  max_fence;       /* ptr to last+1 free byte in perm space */
  40. WORD_PTR  inst_begin;      /* ptr to the beginning of inst. array */
  41.  
  42. LONG_PTR  ereg;            /* last activation record       */
  43. LONG_PTR  breg;            /* last choice point            */
  44. LONG_PTR  hreg;            /* top of heap                  */
  45. LONG_PTR  trreg;           /* top of trail stack           */
  46. LONG_PTR  hbreg;           /* heap back track point        */
  47. LONG_PTR  sreg;            /* current build or unify field */
  48. LONG_PTR  cpreg;           /* return point register        */
  49. WORD_PTR  pcreg;           /* program counter              */
  50.  
  51. LONG_PTR  mheaptop, mlocaltop, mtrailtop;
  52. int       pspace_used;     /* heap_used, stack_used, trail_used */
  53.  
  54. LONG_PTR  trap_vector[MAXTRAPS];
  55. LONG_PTR  hash_table[BUCKET_CHAIN][2];
  56.  
  57. LONG      oprnd1, oprnd2, oprnd3;
  58.  
  59. WORD      flags[10];       /* user flags from command line: -u[0-9] */
  60. BYTE      trace;           /* (0) 1 = trace on, 0 = trace off     */
  61. BYTE      hitrace;         /* (1) 1 = hitrace on, 0 = hitrace off */
  62. BYTE      overflow_f;      /* (2) 1 = ignore stack overflow       */
  63. BYTE      disassem;
  64. BYTE      trace_sta;       /* 1 = keep max stack size stats */
  65. BYTE      call_intercept;  /* hitrace or trace_sta for efficiency */
  66. int       num_line;        /* print instruction addresses on trace
  67.                               and disassem */
  68.  
  69. LONG      nil_sym, list_str;
  70.  
  71. int       interrupt_code;
  72.  
  73. PSC_REC_PTR  list_psc;
  74. PSC_REC_PTR  interrupt_psc;
  75. PSC_REC_PTR  comma_psc;
  76.